cmake_minimum_required(VERSION 2.8.1)

set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "" FORCE)
SET(CMAKE_DEBUG_POSTFIX "d")

project("Projects")

IF(NOT EXISTS "${CMAKE_SOURCE_DIR}/UserSettings.cmake")
  message("Kopiere UserSettings.cmake.template -> UserSettings.cmake")
  execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/UserSettings.cmake.template ${CMAKE_SOURCE_DIR}/UserSettings.cmake)
ENDIF(NOT EXISTS "${CMAKE_SOURCE_DIR}/UserSettings.cmake")

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP")

set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /GS-")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /GS-")
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /NXCOMPAT:NO /DYNAMICBASE:NO /ERRORREPORT:NONE /RELEASE")
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /NXCOMPAT:NO /DYNAMICBASE:NO /RELEASE")

set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /INCREMENTAL:NO")

#message("${CMAKE_EXE_LINKER_FLAGS}")

set_property(GLOBAL PROPERTY USE_FOLDERS On)
set_property(GLOBAL APPEND PROPERTY DEBUG_CONFIGURATIONS DEBUG)

set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG QT_DEBUG)
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELEASE QT_NO_DEBUG)


include (UserSettings.cmake)

set(QT_QMAKE_EXECUTABLE "${QT_SHARED_BIN}\\qmake.exe")
message("${QT_QMAKE_EXECUTABLE}")

#set(CMAKE_VERBOSE_MAKEFILE TRUE)

# ------------------------ PROJECT INCLUDES -----------------------------------

add_subdirectory("Metabolic Network Navigator")
